using FairyGUI;
using GameFramework;

namespace StarForce
{
    public class GameOverPage : FGuiForm
    {
        protected override void OnOpen(object userData)
        {
            base.OnOpen(userData);
            Transition t = UI.GetTransition("t0");
            t.Play();
            
            
            UI.GetChild("n2").onClick.Add(RestartGame);
            UI.GetChild("n4").onClick.Add(ToMenu);
        }


        private void RestartGame()
        {
            GameEntry.Event.Fire(this,ReferencePool.Acquire<RestartGameEventGame>());
            Close();
        }

        private void ToMenu()
        {
            
        }
    }
}